package com.springboot.mongo.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户dao
 *
 * @author supu
 * @date 2019-08-26 14:28
 **/
@Data
@Document(collection = "user_login_record")
public class UserLoginRecord implements MongoEntity<String>, Serializable {
    private static final long serialVersionUID = 4179601660331618152L;

    /**
     * 主键id
     */
    @Id
    private String id;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 登陆时间
     */
    private Date loginTime;

    /**
     * 登陆次数
     */
    private Integer loginCount;

    /**
     * 更新时间
     */
    private Date modifyTime;

    @Override
    public String getPrimaryKey() {
        return id;
    }
}
